Pydpf is most easily (and robustly) installed from pypi using "pip install pydpf". And our experiments are most easily setup by cloning our github repo "https://github.com/John-JoB/pydpf/tree/main/docs/source".

However we also provide the following instructions to build the package from a collection of source files.

1. Create a fresh python 3.14.0 environment.

2. Run "pip install -r requirements.txt". (Note we recommend installing pytorch using the instructions at https://pytorch.org/get-started/locally/ to ensure you have the latest correct version for your compute platform before
pip installing requirements.txt.)

3. Create a directory called "pydpf".

4. Place all of the following files inside it:
    __init__.py
    base.py
    conditional_resampling.py
    datautils.py
    deserialisation.py
    filtering.py
    gradient_regularisation.py
    Kalman.py
    model_based_api.py
    optimal_transport.py
    outputs.py
    resampling.py
    utils.py

5. Create a directory called "distributions" inside the directory "pydpf" that you just filled

6. Place all of the following files inside the new directory "distributions":
    d__init__.py
    d_base.py
    Gaussian.py
    kde.py
    vonMises.py

7. Rename "d__init__.py" to "__init__.py", and "d_base.py" to "base.py".

8. Install the package locally with pip, this can be done by running "pip install ." from the folder "pydpf"

9. Follow the instructions in "dm_setup_instructions.txt", "lg_setup_instructions.txt", and "sv_setup_instructions.txt" to setup the experiment environments.